<template>
  <div class="row">
    <div class="col">
      <div class="item">
        <div class="title">任务信息</div>
        <div class="chartBox chartBox1">
          <div class="text text1">
            <div class="left">当前任务：</div>
            <div class="right">
              <p  v-for="item in user.task">{{ item }}</p>
            </div>
          </div>
          <div class="text">
            <div class="left">课前探究：</div>
            <div class="right">
              <span v-if="user.task_switch == 1">已完成</span>
              <span v-else>未完成</span>
              <img src="@/assets/personal-right-bg.png" alt="" />
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="col">
      <div class="item">
        <div class="title">智能学情档案</div>
        <div class="content chartBox">
          <div class="left">
            <!-- 学员照片 -->
            <img :src="user.avatar" alt="" />
          </div>
          <div class="right">
            <p>姓名：</p>
            <strong>{{ user.name }}</strong>
            <p>学号：</p>
            <strong>{{user.username}}</strong>
          </div>
        </div>
      </div>
    </div>
    <div class="col">
      <div class="item">
        <div class="title">三维目标达成情况</div>
        <div class="chartBox">
          <pieChart chartId="pieChart10" :datas="user.three_target" />
        </div>
      </div>
    </div>
    <div class="col">
      <div class="item">
        <div class="title">项目完成情况</div>
        <div class="chartBox">
          <barChart chartId="barChart10" :datas="user.task_info" />
        </div>
      </div>
    </div>
    <div class="col">
      <div class="item">
        <div class="title">晋级情况</div>
        <div class="chartBox">
          <linesChart chartId="linesChart10" :datas="user.promotion" />
        </div>
      </div>
    </div>
    <div class="col">
      <div class="item">
        <div class="title">五能要素达成情况</div>
        <div class="chartBox">
          <radarChart chartId="radarChart10" :datas="user.five_elements" />
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { mapState, mapMutations } from "vuex";
export default {
  name: "evaluateView",
  data() {
    return {};
  },
  components: {
    barChart: () => import("@/components/barChart.vue"),
    linesChart: () => import("@/components/linesChart.vue"),
    radarChart: () => import("@/components/radarChart.vue"),
    pieChart: () => import("@/components/pieChart.vue"),
  },
  props: ["user"],
  computed: {
    ...mapState(["task_id", "left_id"]),
  },
  watch:{
    user:()=>{
      
    }
  },
  mounted() {
    // this.$store.commit("changeLeftId", "a");
  },
  methods: {
    ...mapMutations(["changeLeftId"]),
    change(id) {
      this.$store.commit("changeLeftId", id);
    },
  },
};
</script>
<style lang="scss" scoped>
.personalData {
  height: calc(100% - 57px);
}
.chartBox1 {
  padding: 30px;
}
.text {
  display: flex;
  font-size: 18px;
  padding: 10px 0;
  .left {
    color: #72e6ff;
    font-weight: bold;
  }
  .right {
    position: relative;
    span {
      position: absolute;
      top: 15px;
      left: 60px;
      color: #68e7f1;
    }
  }
}
.content {
  display: flex;
  padding: 15px 20px;

  .left {
    width: 175px;
    background: url("@/assets/personal-left-bg.png") center center no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    img {
      width: 100%;
      height: 100%;
      max-width: 145px;
      max-height: 200px;
    }
  }
  .right {
    width: calc(100% - 175px);
    padding-left: 20px;
    font-size: 18px;

    strong {
      color: #72e6ff;
      font-size: 26px;
      margin-bottom: 15px;
      display: block;
    }
  }
}
</style>
